<template>
  <div class="all">
    <all-hot :allList="allList" @many="many"></all-hot>
    <content-tag :list="list"></content-tag>
  </div>
</template>
<script>
import { getList, getRoom } from "../utils/api/http";
import allHot from "@/components/allHot";
import content from "@/components/content";
export default {
  data() {
    return {
      list: [],
      allList: [],
    };
  },
  created() {
    getRoom(1, "").then((res) => {
      this.allList = res.data.data.list.splice(0, 4);
      console.log(this.allList);
    });
    getList().then((res) => {
      this.list = res.data.data;
    });
  },
  methods: {
    many() {
      this.$router.push({
        path: "/allHot",
      });
    },
  },
  components: {
    contentTag: content,
    allHot,
  },
};
</script>
<style lang="scss" scoped>
.all {
  height: 100%;
  .content {
    margin-top: -0.5rem;
  }
}
</style>